import { axios } from '@/utils/request'

//企宽在途
export function getQkIngTotal(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_ing_total',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            'flag': info.flag,  //类型 0 ： 全部 1：加装 2：非加装
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
  }

 //企宽装机
export function getQkInstallGrid(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_install_grid',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
  } 


//企宽投诉
export function getQkComplainGrid(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: 'api/install/manage/qk_complain_grid',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
  }   

//企宽二级页面趋势图
export function getQkIngDay(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_ing_day',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "country": info.country,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
}     



//企宽一级页面装机
export function getQkInstallMonth(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_install_month',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
}  



//企宽一级页面投诉
export function getQkComplainMonth(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_complain_month',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
} 


//企宽一级页面表格详情
export function getQkIngDetail(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_ing_detail',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "flag": info.flag,
            "country": info.country,
            "current": info.current,
            "pageSize": info.pageSize,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
} 

//企宽一级页面表格详情 当日受理
export function getQkLastDeatil(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_last_detail',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "flag": info.flag,
            "country": info.country,
            "current": info.current,
            "pageSize": info.pageSize,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
} 
//企宽一级页面表格详情在途 产出
export function getQkCcRateDetail(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_cc_detail',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "type": info.type,
            "country": info.country,
            "current": info.current,
            "pageSize": info.pageSize,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
} 


//企宽一级页面表格详情装机 及时率
export function getQkRateDetail(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_rate_detail',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "type": info.type,
            "country": info.country,
            "current": info.current,
            "pageSize": info.pageSize,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
} 


//企宽一级页面表格详情装机  满意度
export function getQkSatisfiedRateDetail(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_satisfied_detail',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "type": info.type,
            "country": info.country,
            "current": info.current,
            "pageSize": info.pageSize,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
}


//企宽一级页面表格详情投诉
export function getQkComplainDetail(info) {
  return new Promise((resolve, reject) => {
        axios({
          url: '/api/install/manage/qk_complain_detail',
          method: 'get',
          params: {
            "startTime": info.startTime,
            "endTime": info.endTime,
            "type": info.type,
            "country": info.country,
            "current": info.current,
            "pageSize": info.pageSize,
          }
        }).then(
          (response) => {
            resolve(response);
          },
          (err) => {
            reject(err);
          }
        );
      });
}


//企宽在途详情导出
export function exportExcelQkInstallsExport(info) {
  return axios({
    url: '/api/export/manage/qk_installs_export',
    method: 'post',
    responseType:'blob',
    params: {
      "startTime": info.startTime,
      "endTime": info.endTime,
      "flag": info.flag,
      "country": info.country,
    }
  })
}
//企宽 当日受理 在途详情导出
export function exportExcelQLastInstallsExport(info) {
  return axios({
    url: '/api/export/manage/qk_last_installs_export',
    method: 'post',
    responseType:'blob',
    params: {
      "startTime": info.startTime,
      "endTime": info.endTime,
      "flag": info.flag,
      "country": info.country,
    }
  })
}

//企宽及时率导出
export function exportExcelQkDetailExport(info) {
  return axios({
    url: '/api/export/manage/qk_rate_detail_export',
    method: 'post',
    responseType:'blob',
    params: {
      "startTime": info.startTime,
      "endTime": info.endTime,
      "type": info.type,
      "country": info.country,
    }
  })
}


//企宽投诉导出
export function exportExcelQkComplainDetailExport(info) {
  return axios({
    url: '/api/export/manage/qk_complain_detail_export',
    method: 'post',
    responseType:'blob',
    params: {
      "startTime": info.startTime,
      "endTime": info.endTime,
      "type": info.type,
      "country": info.country,
    }
  })
}

//企宽满意度导出
export function exportExcelQkSatisfiedDetailExport(info) {
  return axios({
    url: '/api/export/manage/qk_satisfied_detail_export',
    method: 'post',
    responseType:'blob',
    params: {
      "startTime": info.startTime,
      "endTime": info.endTime,
      "type": info.type,
      "country": info.country,
    }
  })
}